/**
 *
 *
 * 
 *
 * 
 */

package io.dbw.modules.business.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import io.dbw.modules.business.entity.SysUserRoleEntity;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 用户与角色对应关系
 *
 * 
 */
@Mapper
public interface SysUserRoleDao extends BaseMapper<SysUserRoleEntity> {
	
	/**
	 * 根据用户ID，获取角色ID列表
	 */
	List<Long> queryRoleIdList(@Param("userId") Long userId);

	long queryRoleNumByUserId(@Param("userId") Long userId);
	/**
	 * 根据角色ID数组，批量删除
	 */
	int deleteBatch(@Param("roleIds") List<Long> roleIds);

	void deleteSysUserRoleByUserId (@Param("userId") Long userId);
}
